In a networking environment, each network device has an adapter identified by a Media Access Control, or MAC address, generally comprising a unique identifier. In large-scale computing environments, a reliable and automatic way to collect MAC addresses of a network's servers and other devices is needed for various purposes. For example, if a network device known by its MAC address is confirmed to be at a certain port, e.g., as located within a rack of servers, that device can be consistently assigned the same Internet Protocol (IP) address in response to a Dynamic Host Configuration Protocol (DHCP) request.
A typical way to collect MAC addresses and port data is to periodically connect to (scan) each network switch, and harvest those MAC addresses of which the switch is aware using a “show MAC-address-table” command. However, there are problems with this solution. One such problem is that this periodic harvesting solution is inefficient and does not scale well for large networks. This is primarily because the time needed for scanning is proportional to the number of devices being scanned. Another problem is that MAC addresses maintained by a switch become outdated and are frequently purged from the MAC address table, e.g., on the order of five minutes. As a result, a MAC address often will be purged from a switch's MAC address table before it can be collected.